package com.meeruu.sg.account.core.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan("com.meeruu")
@SpringBootApplication
@EnableDiscoveryClient
public class Application {
    
    private static final Logger LOGGER = LoggerFactory.getLogger(Application.class);

    public static void main( String[] args ){
        long start = System.currentTimeMillis();

        // 启动应用
        ConfigurableApplicationContext ctx = SpringApplication.run(Application.class, args);

        LOGGER.info("Application start in {} ms，activeProfile = {}",
                (System.currentTimeMillis() - start), ctx.getEnvironment().getActiveProfiles());
    }
}
